<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>for.html</title>
<script>
	function gugudan() {
		var d=document.getElementById("dan")
		var str="";
		for(var i=1;i<=9;i++){
			var r = Number(dan.value) * i;
			str += dan.value + '*' + i + '=' + r + '\n' ;
			
		}

		ta.value=str;
	}

</script>
</head>
<body>
	<input type='number' id='dan' value='5'>
	<input type='button' id='clk' value='구구단' onclick='gugudan()'>
	<textarea id='ta' rows='300px' cols='800px'></textarea>



</body>
</html>